package com.itcat.common;

/**
 * [一句话描述该类的功能]
 *
 * @author : [Cr Mr]
 * @version : [v1.0]
 * @date : [2022/3/30 13:31]
 */
public enum ResultCode implements IErrorCode {
    LOGIN_FAILED(405L, "用户名或密码错误"),
    SUCCESS(200L, "操作成功"),
    FAILED(500L, "系统异常"),
    VALIDATE_FAILED(404L, "参数检验失败"),
    UNAUTHORIZED(401L, "暂未登录或token已经过期"),
    FORBIDDEN(403L, "没有相关权限");

    ResultCode(Long code, String message) {
        this.code = code;
        this.message = message;
    }

    private Long code;

    private String message;

    @Override
    public long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
